package com.share.hope.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@Builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_info")
@Schema(description = "存储用户的信息")
public class UserInfo {

    @TableId(type = IdType.AUTO, value = "id")
    @Schema(description = "用户的唯一标识")
    private Long id;

    @TableField(value = "name")
    @Schema(description = "名称")
    private String name;

    @TableField(value = "account_number")
    @Schema(description = "账号")
    private String accountNumber;

    @TableField(value = "password")
    @Schema(description = "密码->md5")
    private String password;

    @TableField(value = "love_coin")
    @Schema(description = "爱心币")
    private Double loveCoin;

    @TableField(value = "punch_streak")
    @Schema(description = "连续打卡天数")
    private Integer punchStreak;

    @TableField(value = "punch_longest")
    @Schema(description = "最大连续打卡天数")
    private Integer punchLongest;

    @TableField(value = "img_path")
    @Schema(description = "头像路径")
    private String imgPath;

    @TableField(value = "role_num")
    @Schema(description = "登錄角色")
    private Integer roleNum;

    @TableField(exist = false)
    private String newPassword;

}